package com.lcz.wananroid_mvvm;

import android.app.Application;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.databinding.BindingAdapter;

import com.hjq.bar.OnTitleBarListener;

import me.goldze.mvvmhabit.base.BaseModel;
import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;

/**
 * @author: Lczed
 * @date on 2020/11/17 16:57 星期二
 * E-mail: lcz3466601343@163.com
 * Description :
 */
public class MainModel extends BaseViewModel {
    public MainModel(@NonNull Application application) {
        super(application);
    }

    //登录按钮的点击事件
    public BindingCommand loginOnClickCommand = new BindingCommand(new BindingAction() {
        @Override
        public void call() {

        }
    });

    
    public OnTitleBarListener mOnTitleBarListener = new OnTitleBarListener() {
        @Override
        public void onLeftClick(View v) {
            LogUtils.d("返回按钮被点击");
        }

        @Override
        public void onTitleClick(View v) {
            LogUtils.d("标题被点击");
        }

        @Override
        public void onRightClick(View v) {

        }
    };
}